﻿
<%

'先定义
Dim Order_ID		
Dim Order_No		
Dim Order_Type		
Dim Order_Content	
Dim Order_Price		
Dim Order_UserName	
Dim Order_Link		
Dim Order_Mobile	
Dim Order_Tel		
Dim Order_Email		
Dim Order_Remark	
Dim Order_Status	
Dim Order_Process	
Dim Order_Adddate	


Sub Order_Edit()	

	ID = reform("Order_ID")
	Call Check_IsNumeric(ID)
	
	Order_Status = reform("Order_Status")

	sql = " UPDATE Online_Order Set " &_
		  " Order_Status="&Order_Status&_	
		  " WHERE Order_ID  = "&ID
		


	Call Db_Execute("订单修改",Sql,"Order_Query.asp")

End Sub


Sub Order_Del()

	HT_ID = Reform("OP_ID")	


	sql = "UPDATE  Online_Order SET Order_IsDel=1 WHERE Order_ID IN ( "&HT_ID &")"

	Call Db_Execute("订单删除",Sql,"Order_Query.asp")
	
End Sub



Sub Get_Order_Info()

	Order_ID = requery("Order_ID")

	Call Check_IsNumeric(Order_ID)

	sql = "SELECT "&_
		" Order_ID"&_		
		",Order_No"&_		
		",Order_Type"&_		
		",Order_Content"&_	
		",Order_Price"&_		
		",Order_UserName"&_	
		",Order_Link"&_		
		",Order_Mobile"&_	
		",Order_Tel"&_		
		",Order_Email"&_		
		",Order_Remark"&_	
		",Order_Status"&_	
		",Order_Process"&_	
		",Order_Adddate"&_	
		" FROM online_Order WHERE Order_ID = " &Order_ID

	Set rs = conn.execute(sql)
	
	If Not rs.eof Then

		Order_ID = rs("Order_ID")		
		Order_No = rs("Order_No")		
		Order_Type = rs("Order_Type")		
		Order_Content = encode_article(rs("Order_Content"))
		Order_Price = rs("Order_Price")		
		Order_UserName = rs("Order_UserName")	
		Order_Link = rs("Order_Link")		
		Order_Mobile = rs("Order_Mobile")	
		Order_Tel = rs("Order_Tel")		
		Order_Email = rs("Order_Email")		
		Order_Remark = encode_article(rs("Order_Remark"))
		Order_Status = rs("Order_Status")	
		Order_Process = rs("Order_Process")	
		Order_Adddate = rs("Order_Adddate")	
	End If 
	
	Rs.close

End Sub 
Function Get_Order_Status(Order_Status)
	Select Case Order_Status
		Case "0" Get_Order_Status = "未处理"
		Case "1" Get_Order_Status = "正在处理"
		Case "2" Get_Order_Status = "完成"
		Case "9" Get_Order_Status = "取消订单"
	End Select 
End Function 

%>
